package cn.initcap.designpattern.principle.compositionaggregation;

/**
 * @author initcap
 * @date 2018/8/28 AM9:15
 */
public class Test {

    public static void main(String[] args) {
        ProductDao productDao = new ProductDao();
        productDao.setDbConnection(new PostgresqlConnection());
        productDao.addProduct();

        productDao.setDbConnection(new MysqlConnection());
        productDao.addProduct();
    }

}
